package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"housing/api/internal/config"
	"housing/housingrpc/housingrpcclient"
)

type ServiceContext struct {
	Config     config.Config
	HousingRpc housingrpcclient.Housingrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:     c,
		HousingRpc: housingrpcclient.NewHousingrpc(zrpc.MustNewClient(c.HousingRpc)),
	}
}
